Just Spring by Madhusudhan Konda

Just Spring by Madhusudhan Konda

Author:Madhusudhan Konda
Language: eng
Format: mobi, epub, pdf
Tags: COMPUTERS / Programming Languages / Java
Publisher: O'Reilly Media
Published: 2011-07-25T16:00:00+00:00


public class EmployeeCreator {

public Employee createEmployee() {

Employee emp = new Employee();

return emp;

}

public Employee createExecutive() {

Employee emp = new Employee();

emp.setTitle("EXEC");

emp.setBonusGrade("GRADE-A");

return emp;

}

}

Declare the bean config (Example 3-7) as shown below:

Example 3-7. EmployeeCreator metadata

<bean name="empCreator" factor-bean="employeeCreator" factory-method="createEmployee"/>

<bean name="execCreator" factor-bean="employeeCreator" factory-method="createExecutive"/>

<bean name="employeeCreator" class="com.oreilly.justspring.ch3.EmployeeCreator"/>



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.